﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace Homestake_Mine
{
    class GameObject
    {
        // Set the avatar position and rotation variables.
        public Vector3 Position = Vector3.Zero;
        public Vector3 LastPosition;
        public float objectYaw;

        //Load the Model and Texture of the Object
        public Model model = null;
        public Texture2D texture = null;

        //Camera Settings
        public Vector3 PositionofCamera = Vector3.Zero;
        public float Zoom = 2000;
        public Matrix View;
        public Matrix Proj;
        public Vector3 cameraLookAt = Vector3.Zero;
        public Vector3 CameraReference = new Vector3(0, 1, 0);
        public Matrix World = Matrix.Identity;

        //Set Collision Blocks (some unused for now)
        //public Plane plane;
        //public BoundingBox bBox;
        public BoundingSphere bSphere;

        // Set rates in world units per 1/60th second (the default fixed-step interval).
        public float rotationSpeed = 1f / 60f;
        public float forwardSpeed = 40f / 60f;

        //The Rotation angle of the Object
        public Vector3 rotation = Vector3.Zero;

        //Whether the Object should be drawn
        public bool alive = true;
        public bool found = false;

        //Debugging Tools
        public string ReportPosition = null;

        //Reports for Debugging
        public string GetPositionToString()
        {
            this.ReportPosition = " ";
            this.ReportPosition += this.Position.X + ", ";
            this.ReportPosition += this.Position.Y + ", ";
            this.ReportPosition += this.Position.Z;

            return ReportPosition;
        }
    }
}
